package com.demo.instanceofop;

public class C {
	void ab() {
		
	}
	
	public static void main(String[] args) {
		
		A a=new A();
		A a2=new B();
		
		B _b$=new B();
		/**
		 *  instanceof 
		 */
		System.out.println(a instanceof A); // true 
		System.out.println((B)a instanceof B); //false
		System.out.println(a2 instanceof A); // true
		System.out.println(a2 instanceof B); // true
		System.out.println(_b$ instanceof B); // true
		System.out.println((A)_b$ instanceof A); //true
		
		A a3=(A)_b$;
		
		 /**
		  * a instanceof B 
		  * 
		  * in java multiple inheritance is not allowed if you want achieve multiple inheritanc  u can use interface.
		  */
		
		
		/**
		 *  Class -- Start with captial 
		 *  mehtod and and variable --  camel case 
		 *  constants - only capital letter. 
		 *  variable can contain special symbols ($, _ ) 
		 *  variable always starts with either alphbets or special symbol 
		 */
	}

}
